.class public Lcom/esfile/screen/recorder/media/glutils/e;
.super Ljava/lang/Object;
.source "TextureRender.java"


# static fields
.field private static final h:[F

.field private static final i:[F

.field private static final j:[S


# instance fields
.field private final a:Ljava/nio/FloatBuffer;

.field private final b:Ljava/nio/FloatBuffer;

.field private final c:Ljava/nio/ShortBuffer;

.field private d:Les/v8;

.field private e:[F

.field private f:[F

.field private g:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/16 v0, 0xc

    new-array v0, v0, [F

    .line 1
    fill-array-data v0, :array_0

    sput-object v0, Lcom/esfile/screen/recorder/media/glutils/e;->h:[F

    const/16 v0, 0x8

    new-array v0, v0, [F

    .line 2
    fill-array-data v0, :array_1

    sput-object v0, Lcom/esfile/screen/recorder/media/glutils/e;->i:[F

    const/4 v0, 0x6

    new-array v0, v0, [S

    .line 3
    fill-array-data v0, :array_2

    sput-object v0, Lcom/esfile/screen/recorder/media/glutils/e;->j:[S

    return-void

    nop

    :array_0
    .array-data 4
        -0x40800000    # -1.0f
        -0x40800000    # -1.0f
        0x0
        0x3f800000    # 1.0f
        -0x40800000    # -1.0f
        0x0
        -0x40800000    # -1.0f
        0x3f800000    # 1.0f
        0x0
        0x3f800000    # 1.0f
        0x3f800000    # 1.0f
        0x0
    .end array-data

    :array_1
    .array-data 4
        0x0
        0x0
        0x3f800000    # 1.0f
        0x0
        0x0
        0x3f800000    # 1.0f
        0x3f800000    # 1.0f
        0x3f800000    # 1.0f
    .end array-data

    :array_2
    .array-data 2
        0x0s
        0x2s
        0x3s
        0x3s
        0x1s
        0x0s
    .end array-data
.end method

.method public constructor <init>()V
    .locals 1

    .line 1
    new-instance v0, Les/u8;

    invoke-direct {v0}, Les/u8;-><init>()V

    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/media/glutils/e;-><init>(Les/v8;)V

    return-void
.end method

.method public constructor <init>(Les/v8;)V
    .locals 2
    .param p1    # Les/v8;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 3
    sget-object v0, Lcom/esfile/screen/recorder/media/glutils/e;->h:[F

    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a([F)Ljava/nio/FloatBuffer;

    move-result-object v0

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->a:Ljava/nio/FloatBuffer;

    .line 4
    sget-object v0, Lcom/esfile/screen/recorder/media/glutils/e;->i:[F

    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a([F)Ljava/nio/FloatBuffer;

    move-result-object v0

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->b:Ljava/nio/FloatBuffer;

    .line 5
    sget-object v0, Lcom/esfile/screen/recorder/media/glutils/e;->j:[S

    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a([S)Ljava/nio/ShortBuffer;

    move-result-object v0

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->c:Ljava/nio/ShortBuffer;

    const/16 v0, 0x10

    new-array v1, v0, [F

    .line 6
    iput-object v1, p0, Lcom/esfile/screen/recorder/media/glutils/e;->e:[F

    new-array v0, v0, [F

    .line 7
    iput-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->f:[F

    const/16 v0, -0x3039

    .line 8
    iput v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->g:I

    .line 9
    iput-object p1, p0, Lcom/esfile/screen/recorder/media/glutils/e;->d:Les/v8;

    const/4 p1, 0x0

    .line 10
    invoke-static {v1, p1}, Landroid/opengl/Matrix;->setIdentityM([FI)V

    .line 11
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->f:[F

    invoke-static {v0, p1}, Landroid/opengl/Matrix;->setIdentityM([FI)V

    return-void
.end method


# virtual methods
.method protected a()I
    .locals 1

    .line 3
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->d:Les/v8;

    invoke-interface {v0}, Les/v8;->a()I

    move-result v0

    invoke-static {v0}, Lcom/esfile/screen/recorder/media/glutils/b;->a(I)I

    move-result v0

    return v0
.end method

.method public a(I)V
    .locals 6

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->e:[F

    neg-int p1, p1

    int-to-float v2, p1

    const/4 v1, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/high16 v5, 0x3f800000    # 1.0f

    invoke-static/range {v0 .. v5}, Landroid/opengl/Matrix;->rotateM([FIFFFF)V

    return-void
.end method

.method public a(Landroid/graphics/SurfaceTexture;)V
    .locals 14
    .param p1    # Landroid/graphics/SurfaceTexture;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->f:[F

    invoke-virtual {p1, v0}, Landroid/graphics/SurfaceTexture;->getTransformMatrix([F)V

    .line 2
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/glutils/e;->d:Les/v8;

    iget v2, p0, Lcom/esfile/screen/recorder/media/glutils/e;->g:I

    iget-object v3, p0, Lcom/esfile/screen/recorder/media/glutils/e;->a:Ljava/nio/FloatBuffer;

    iget-object v7, p0, Lcom/esfile/screen/recorder/media/glutils/e;->b:Ljava/nio/FloatBuffer;

    iget-object v9, p0, Lcom/esfile/screen/recorder/media/glutils/e;->e:[F

    iget-object v10, p0, Lcom/esfile/screen/recorder/media/glutils/e;->f:[F

    iget-object v11, p0, Lcom/esfile/screen/recorder/media/glutils/e;->c:Ljava/nio/ShortBuffer;

    const/16 v4, 0xc

    const/4 v5, 0x3

    const/4 v6, 0x4

    const/16 v8, 0x8

    const-wide/16 v12, 0x0

    invoke-interface/range {v1 .. v13}, Les/v8;->a(ILjava/nio/FloatBuffer;IIILjava/nio/FloatBuffer;I[F[FLjava/nio/ShortBuffer;J)V

    return-void
.end method

.method public a(Z)V
    .locals 1

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->b:Ljava/nio/FloatBuffer;

    invoke-static {v0, p1}, Lcom/esfile/screen/recorder/media/glutils/b;->a(Ljava/nio/FloatBuffer;Z)V

    return-void
.end method

.method public b()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->g:I

    return v0
.end method

.method public c()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->d:Les/v8;

    invoke-interface {v0}, Les/v8;->init()V

    .line 2
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/glutils/e;->a()I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->g:I

    return-void
.end method

.method public d()V
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->d:Les/v8;

    invoke-interface {v0}, Les/v8;->destroy()V

    .line 2
    iget v0, p0, Lcom/esfile/screen/recorder/media/glutils/e;->g:I

    const/16 v1, -0x3039

    if-eq v0, v1, :cond_0

    const/4 v2, 0x1

    new-array v3, v2, [I

    const/4 v4, 0x0

    aput v0, v3, v4

    .line 3
    invoke-static {v2, v3, v4}, Landroid/opengl/GLES20;->glDeleteTextures(I[II)V

    .line 4
    iput v1, p0, Lcom/esfile/screen/recorder/media/glutils/e;->g:I

    :cond_0
    return-void
.end method
